package Day6;

import java.util.Scanner;
// 1:无需package
// 2: 类名必须Main, 不可修改
/**
 * 2020JavaB真题:车牌
 * https://www.lanqiao.cn/problems/2361/learning/
 */
public class Main5 {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int sum = 0;
        //在此输入您的代码...
        for(int i = 0;i<16;i++)
        for(int j = 0;j<16;j++)
        for(int k = 0;k<16;k++)
        for(int k1 = 0;k1<10;k1++)
        for(int k2 = 0;k2<10;k2++)
        for(int k3 = 0;k3<10;k3++)
        {
          if(i==j&&j==k || j==k&&k==k1 || k==k1&&k1==k2 || k1==k2&&k2==k3)
          continue;
          else sum++;
        }
        System.out.println(sum);
        scan.close();
    }
}